﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kona.Data.Tests.CodeSample.Reports.Queries
{
    internal class UsCustomerCountsByStateForFiscalYearMdx
    {
         private const string MdxTemplate = @"select [Date].[Month of Year].Children  on 0, " +
                                          "[Customer].[Customer Geography].[Country].&[United States].Children on 1 " +
                                          "from [Adventure Works] " +
                                          "where ([Measures].[Customer Count],[Date].[Fiscal Year].&[@FiscalYear])";

        internal UsCustomerCountsByStateForFiscalYearMdx(Parameters.FiscalYear fiscalYear)
        {
            this.FiscalYear = fiscalYear;
        }


        internal Parameters.FiscalYear FiscalYear
        { get; private set; }

        public override string ToString()
        {
            return MdxTemplate.Replace(FiscalYear.ParameterName, FiscalYear.Value.ToString());
        }

    }
}
